classes = [
    {"name": "n_1", "age": 24, "grade": "A"},
    {"name": "n_2", "age": 23, "grade": "B"},
    {"name": "n_3", "age": 28, "grade": "A"},
    {"name": "n_4", "age": 24, "grade": "A"},
    {"name": "n_5", "age": 25, "grade": "C"},
    {"name": "n_6", "age": 21, "grade": "D"},
    {"name": "n_7", "age": 27, "grade": "A"},
]


def choose_grade(item):
    return item['grade'] == 'A'


grade_a_list = filter(choose_grade, classes)
for i in grade_a_list:
    print(i)


def add_age(item):
    item["age"] = item["age"] + 1
    return item


new_classes = map(add_age, classes)


for i in new_classes:
    print(i)


def fib(n):
    if n == 1:
        return 1
    if n == 2:
        return 1
    return fib(n-1) + fib(n-2)


print(fib(10))